package com.zkh.myframe.database.mapper.tag;

import com.zkh.myutils.markup.Element;

/**
 * Trim标签
 * @author zkh
 */
public class Trim extends Tag {
	//追加前缀
	private String prefixAppend;
	//删除前缀
	private String prefixTrim;
	//追加后缀
	private String suffixAppend;
	//删除后缀
	private String suffixTrim;
	
	/**
	 * 渲染属性
	 */
	public void renderAttribute(Element node) {
		setPrefixAppend(node.getAttr("prefixAppend", true));
		setPrefixTrim(node.getAttr("prefixTrim", true));
		setSuffixAppend(node.getAttr("suffixAppend", true));
		setSuffixTrim(node.getAttr("suffixTrim", true));
	}
	
	public String getPrefixAppend() {
		return prefixAppend;
	}
	public void setPrefixAppend(String prefixAppend) {
		this.prefixAppend = prefixAppend;
	}
	public String getPrefixTrim() {
		return prefixTrim;
	}
	public void setPrefixTrim(String prefixTrim) {
		this.prefixTrim = prefixTrim;
	}
	public String getSuffixAppend() {
		return suffixAppend;
	}
	public void setSuffixAppend(String suffixAppend) {
		this.suffixAppend = suffixAppend;
	}
	public String getSuffixTrim() {
		return suffixTrim;
	}
	public void setSuffixTrim(String suffixTrim) {
		this.suffixTrim = suffixTrim;
	}
	@Override
	public String toString() {
		return "Trim [prefixAppend=" + prefixAppend + ", prefixTrim=" + prefixTrim + ", suffixAppend=" + suffixAppend
				+ ", suffixTrim=" + suffixTrim + "]";
	}
}
